from application import db
from common.models.user import User

class CarOrder(db.Model):
    __tablename__ = 'car_order'

    id = db.Column(db.Integer, primary_key=True)
    carplace = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    cartime = db.Column(db.DateTime)
    carnum = db.Column(db.Integer)
    carreason = db.Column(db.String(150, 'utf8mb4_0900_ai_ci'))
    carsn = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    updated_time = db.Column(db.DateTime)
    created_time = db.Column(db.DateTime)
    mark = db.Column(db.Integer)


    uid = db.Column(db.Integer,db.ForeignKey('user.id'))

    creater = db.relationship('User', foreign_keys=uid)
